@{ Layout = "~/Views/Account/Login/_loginLayout.cshtml"; }
@model WebToolService.LoginModel




<div class="content">
    <!-- BEGIN LOGIN FORM -->
    <form id="FormLogin" class="form-vertical login-form" action="@Url.Content("~/Account/Login")" method="POST" />
    <h3 class="form-title">
        @UIResource.LoginToYourAccount</h3>
    <div class="control-group">
        <div class="controls">
            <div class="input-icon left">
                <i class="icon-user"></i>
                <input name="UserName" class="m-wrap" type="text" placeholder="@UIResource.Username" value="@Model.UserName" />
            </div>
        </div>
    </div>
    <div class="control-group">
        <div class="controls">
            <div class="input-icon left">
                <i class="icon-lock"></i>
                <input id="FormLogin_Password" name="Password" class="m-wrap" type="password" style=""
                    placeholder="@UIResource.Password" />
            </div>
        </div>
    </div>
    <div class="form-actions">
        <label class="checkbox">
            @Html.CheckBoxFor(x => x.RememberMe)
            @UIResource.RememberMe
        </label>
        <a href="javascript:FormLogin_Submit();" id="login-btn" class="btn green pull-right">
            @UIResource.Login <i class="m-icon-swapright m-icon-white"></i></a>
    </div>
    <div class="forget-password">
        <h4>
            @UIResource.DontHaveAAccount</h4>
        <p>
            <a href="javascript:FormLogin_forgetpassword_Click();" class="" id="forget-password">@UIResource.SignUpNow</a>
        </p>
    </div>
    </form>
    @Html.MyValidationSummary()
</div>
<script>
    function FormLogin_Submit() {
        Track('Login', 'Login');
        $('#FormLogin').submit();
    }


    function Login_On_Ready() {
        $("#FormLogin_Password").keyup(function (event) {
        if (event.keyCode == 13) {
            FormLogin_Submit();
        }
    });
    }
    function FormLogin_forgetpassword_Click() {
        Track('Login', 'SignUpNow');
        window.location.href = "@Url.Content("~/Register/Index")";
    }

    Add_JS_Content('Login_On_Ready();');

</script>
